/*
	Title: 00_Master_Run.do
	Paper: Brauning, Ivashina, Ozdagli (2025)
	Description: Run code for figures and tables 
*/

/*------------------------------------------------------------------------------
						  System and Path Settings	
------------------------------------------------------------------------------*/
// Specify working directory path
global main_path = "S:/projects/covenants"

// Defining Paths (no need to change anything below this line):
global do_path = "$main_path"				// code folder 
global data_path = "$main_path/data"		// data folder
global figures_path = "$basedir_t/Ali_Falk/Corporate_leverage/Replication_data_edits/RFS_figures_edits"	// output folder for figures
global tables_path = "$main_path/tables"	// output folder for tables

cd $main_path 


/*------------------------------------------------------------------------------
								Control Panel	
------------------------------------------------------------------------------*/
local figures = 1
local tables = 	0


/*------------------------------------------------------------------------------
								   Figures 	
------------------------------------------------------------------------------*/
if `figures' { 
	do "$do_path/01_Figure2.do"
	do "$do_path/01_Figure3.do"
	do "$do_path/01_Figure4.do"
	do "$do_path/01_Figure5.do"
	do "$do_path/01_Figure6.do"
	do "$do_path/01_Figure7.do"
}


/*------------------------------------------------------------------------------
								   Tables 	
------------------------------------------------------------------------------*/
if `tables' { 
	do "$do_path/02_Table4.do"
	do "$do_path/02_Table7.do"
	do "$do_path/02_Table8.do"
	do "$do_path/02_Table9.do"
	do "$do_path/02_Table10.do"
	do "$do_path/02_Table11.do"
	do "$do_path/02_Table12.do"
}